Skip to content

Move Java example projects under examples/java/ - #2543

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:release/26.10from
imotov:issue-2542-move-java-examples
Sep 9, 2026
Merged

Move Java example projects under examples/java/#2543
rapids-bot[bot] merged 3 commits into
NVIDIA:release/26.10from
imotov:issue-2542-move-java-examples

Conversation

@imotov

@imotov imotov commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Move java/examples and java/cuvs-lucene/examples to examples/java/cuvs-java and examples/java/cuvs-lucene, matching the existing examples for C, C++ and Go.

Add a --build-java-examples flag to build.sh, java/build.sh, and java/cuvs-lucene/build.sh that compiles the examples against the jar just built, and wire it into ci/build_java.sh/ci/build_lucene.sh so CI catches drift between the examples and the cuvs-java/cuvs-lucene API. Fix the examples themselves, which had silently drifted from the current API (builder signatures now require CuVSResources, destroyIndex() -> close(), CagraQuery needs a CuVSMatrix, and CAGRA search now requires an explicit device-padded dataset).

Closes #2448
Closes #2542

@copy-pr-bot

copy-pr-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@imotov imotov added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Sep 2, 2026
@imotov

imotov commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

/ok to test c01744c

@imotov imotov self-assigned this Sep 2, 2026
@imotov
imotov marked this pull request as ready for review September 2, 2026 19:38
@imotov
imotov requested review from a team as code owners September 2, 2026 19:38
@imotov
imotov requested a review from bdice September 2, 2026 19:38

@jameslamb jameslamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved with a minor suggestion

Comment thread .github/workflows/pr.yaml Outdated
- 'examples/build.sh'
- 'examples/c/**'
- 'examples/cmake/**'
- 'examples/cpp/**'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'examples/cpp/**'
- '!examples/.gitignore'
- '!examples/java'

I think it's be a bit simpler to keep these list as only exclusions (!) instead of mixing inclusions and exclusions. In my opinion, that makes them easier to reason about. Could you apply similar changes through the rest of the changed-files diff in this PR please?

@jameslamb
jameslamb removed the request for review from bdice September 4, 2026 17:45
Comment on lines +116 to +117
index.close();
hnswIndex.close();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes, thank you for fixing this. We should have done that when we fixed #1252. Sorry I missed that.

@mythrocks mythrocks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Thank you, this is much more streamlined.

@imotov
imotov requested a review from a team as a code owner September 8, 2026 19:52
@imotov
imotov force-pushed the issue-2542-move-java-examples branch from 959f5fa to 3a0b7e6 Compare September 8, 2026 19:53
Move java/examples and java/cuvs-lucene/examples to examples/java/cuvs-java and examples/java/cuvs-lucene, matching the existing examples for C, C++ and Go.

Add a --build-java-examples flag to build.sh, java/build.sh, and java/cuvs-lucene/build.sh that compiles the examples against the jar just built, and wire it into ci/build_java.sh/ci/build_lucene.sh so CI catches drift between the examples and the cuvs-java/cuvs-lucene API. Fix the examples themselves, which had silently drifted from the current API (builder signatures now require CuVSResources, destroyIndex() -> close(), CagraQuery needs a CuVSMatrix, and CAGRA search now requires an explicit device-padded dataset).

Closes NVIDIA#2448
Closes NVIDIA#2542
@imotov
imotov changed the base branch from main to release/26.10 September 8, 2026 23:19
@imotov
imotov requested review from a team as code owners September 8, 2026 23:19
@imotov
imotov force-pushed the issue-2542-move-java-examples branch from 3a0b7e6 to 7e9c4a9 Compare September 8, 2026 23:22
@imotov

imotov commented Sep 9, 2026

Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot
rapids-bot Bot merged commit d73e5a7 into NVIDIA:release/26.10 Sep 9, 2026
96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consolidate cuvs-java and cuvs-lucene examples in examples/java directory Lucene: Add examples option to build.sh

3 participants